<div class="logo_profile container_12">
    <div class="grid_6 logo_img">
        <img src="<?php echo CRUD_ROUTE; ?>images/logo.png" alt="Logo" />
    </div>
    <div class="grid_6 profile_meta">
        <div class="user_meta">
            <div>
                <img src="<?php echo CRUD_ROUTE; ?>images/avatar.png" alt="" />
            </div>
            <div class="name">
                <?php echo lang('bienvenido'); ?> <?php echo $this->ion_auth->user()->row()->first_name . "  " . $this->ion_auth->user()->row()->last_name; ?><br />
                <a href="<?php echo site_url('crud/perfil'); ?>" class="submeta"><?php echo lang('perfil'); ?></a>
                <a href="<?php echo site_url('crud/logout'); ?>" class="submeta"><?php echo lang('desconectar'); ?></a>
                <a href="<?php echo site_url(); ?>" class="submeta"><?php echo lang('volver'); ?></a>
            </div>
        </div>
        <div class="user_meta" style="padding-bottom: 15px; margin-right: 10px;">
            <div style="padding: 5px;">
                <a href="#" style="text-decoration:none;color: #444444;float: left">
                    <?php echo lang('cambiar_producto'); ?>
                </a>
            </div>
            <div class="name">
                <select id="select_producto" name="select_producto" style="padding: 5px;float: left">
                    <option value=""><?php echo lang('seleccione'); ?></option>
                    <?php
                    $this->load->library('producto');
                    $productos = $this->producto->products();
                    $producto_session = $this->session->userdata('product_id');
                    foreach ($productos->result_array() as $producto) {
                        echo '<option value="' . $producto['id'] . '" '.($producto_session == $producto['id'] ? "selected" : "").'>' . $producto['descripcion'] . '</option>';
                    }
                    ?>
                </select>
                <script type="text/javascript">
                        $('#select_producto').change(function(){
                            var valor = $(this).val();
                            $.ajax({
                                type: "POST",
                                url: '<?php echo site_url('crud/operaciones/cambia_producto_sesion');?>',
                                data: {'p_producto' : valor},
                                success: function(datos){
                                }
                            });
                        });
                </script>
            </div>
        </div>
    </div>

    <div class="clear"></div>
</div>